﻿using System.Data.Entity.ModelConfiguration;
namespace wh40klbModel.ModelConfiguration
{
    class WargearConfiguration:EntityTypeConfiguration<Wargear>
    {
        public WargearConfiguration()
        {
            //Cle Primaire et table
            HasKey(w=>w.Id);
            //Propriete

            //cle etrangere
            HasMany(w => w.Infantries).WithRequired(iwu=>iwu.Wargear);
            HasMany(w => w.Vehicules).WithRequired(vwu=>vwu.Wargear);
        }
    }
}
